function t(t, e, i) {
    return e in t ? Object.defineProperty(t, e, {
        value: i,
        enumerable: !0,
        configurable: !0,
        writable: !0
    }) : t[e] = i, t;
}

var e = getApp(), i = require("../../33BC8B13A71FB5DF55DAE314211CA4D1.js");

Component({
    properties: {
        _style: {
            type: String
        },
        height: {
            type: Number
        },
        width: {
            type: Number
        },
        src: {
            type: String,
            value: "",
            observer: function(e, i, r) {
                var a = this;
                e && this.setData(t({}, r[0], e), function() {
                    a.getImgInfo();
                });
            }
        },
        _class: {
            type: String
        },
        _mode: {
            type: String
        }
    },
    data: {
        isComplete: !1,
        isError: !1,
        _width: 0,
        _height: 0,
        winWidth: e.globalData.windowWidth
    },
    methods: {
        getImgInfo: function() {
            var t = this;
            this.setData({
                isComplete: !1,
                isError: !1
            });
            var e = {};
            "number" == typeof this.data.width && (e.width = this.data.width), i(this.data.src, e).then(function(e) {
                var i = {
                    isComplete: !0
                };
                "number" == typeof t.data.width && (i._width = e.width, i._height = e.height), t.setData(i);
            }).catch(function() {
                t.setData({
                    isError: !0
                });
            });
        }
    }
});